<template>
  <div class="app-main">
    <div class="app-main-item">
      <div class="app-main-left">
        <LeftPieChart  :datas="data"/>
      </div>
      <div class="app-main-des">
        <span class="leftStyle">{{data.earthquakeNum}}</span>
      </div>
      <div class="app-main-txt">地震数量</div>
    </div>
    <div class="app-main-item">
      <div class="app-main-right">
        <pieChart :listData="data"/>
      </div>
      <div class="app-main-des">
        <span class="rightStyle">{{data.disasterNum}}</span>
      </div>
      <div class="app-main-txt">灾评次数</div>
    </div>
  </div>
</template>
<script setup name="NumberDisater">

import LeftPieChart from "./LeftPieChart.vue";
import pieChart from "./pieChart.vue";
const props = defineProps({
  data: {
    required: true,
    type: Object,
    default: {},
  },
});
const { datas } = toRefs(props);

</script>
<style lang="scss" scoped>
.app-main {
  width: 100%;
  height: 210px;
  display: flex;
  justify-content: center !important;
  align-items: center;
  margin-top: 10px;
  &-item {
    width: 210px;
    height: 200px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    //   background: red;
    background-image: url(/src/assets/images/disaterLosses/bg.png);
    background-size: 100% 100%;
    margin-right: 10px;
  }
  &-left {
    width: 140px;
    height: 140px;
    background-image: url(/src/assets/images/disaterLosses/bg_blue.png);
    background-size: 100% 100%;
  }
  &-right {
    width: 140px;
    height: 140px;
    background-image: url(/src/assets/images/disaterLosses/bg_instrument.png);
    background-size: 100% 100%;
  }
  &-num {
    width: 46px;
    height: 30px;
    font-size: 28px;
    font-family: Helvetica Neue LT Pro-65 Medium, Helvetica Neue LT Pro;
    font-weight: normal;
    color: #46ffff;
    line-height: 0px;
  }
  &-des {
    position: absolute;
    top: 30%;
    left: 42%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    .leftStyle {
      width: 40px;
      height: 28px;
      font-size: 24px;
      font-family: Helvetica Neue LT Pro-55 Roman, Helvetica Neue LT Pro;
      font-weight: normal;
      color: #418dfd;
      line-height: 60px;
    }
    .rightStyle {
      width: 40px;
      height: 28px;
      font-size: 24px;
      font-family: Helvetica Neue LT Pro-55 Roman, Helvetica Neue LT Pro;
      font-weight: normal;
      color: #46ffff;
      line-height: 60px;
    }
  }
  &-txt {
    width: 144px;
    height: 16px;
    font-size: 16px;
    text-align: center;
    font-family: Source Han Sans CN-Regular, Source Han Sans CN;
    font-weight: 400;
    color: #ffffff;
    line-height: 2px;
  }
}
</style>
